package com.frank.demo;/*
 *@author:xec
 *@date:2022/2/23  10:47
 */
import org.mybatis.spring.annotation.MapperScan;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.core.env.Environment;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.web.bind.annotation.RestController;


// 注解:@一个固定的英语单词+代表的特殊意思
@EnableScheduling    // 启动定时任务注解
@SpringBootApplication
@RestController
@EnableAsync
@MapperScan("com.frank.demo")
public class App {
    private static final Logger LOG = LoggerFactory.getLogger(App.class);
    public static void main(String[] args) {
//        SpringApplication.run(App.class, args);
        SpringApplication app = new SpringApplication(App.class);
        Environment env = app.run(args).getEnvironment();
        LOG.info("启动成功!!");
        LOG.info("地址：\thttp://127.0.0.1:{}",env.getProperty("server.port"));
    }
}